import request from "@/services/request.ts";
export const refreshToken = (token: string)=> {
    return request.post('/refresh', {}, {
        headers: {
            'Authorization': `Bearer ${token}`
        }
    })
}
export const login = (params: { username: string, password: string })=> {
    return request.post('/auth/login', {
        username:params.username,
        password: params.password
    })
}
export const register = (data:any) => {
    return request.post('/auth/register', data)
}